<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>财联社电报数据展示 - 调试版</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
    <div class="container">
        <header>
            <h1>财联社电报数据展示 - 调试版</h1>
            <div class="stats">
                <span id="total-count">总电报数: --</span>
                <span id="latest-time">最新更新: --</span>
                <span id="last-refresh">最后刷新: --</span>
                <span id="wechat-status">微信推送: --</span>
            </div>
        </header>
        
        <!-- 微信推送控制区域 - 折叠面板 -->
        <div class="wechat-panel-container">
            <button id="wechat-panel-toggle" class="wechat-panel-toggle">
                <span class="toggle-icon">⚙️</span> 微信推送配置
            </button>
            
            <div class="wechat-controls collapsed">
                <div class="config-section">
                    <div class="config-header">
                        <h2>微信推送配置</h2>
                        <button id="wechat-panel-close" class="panel-close-btn">×</button>
                    </div>
                    
                    <div class="config-row">
                        <div class="toggle-switch">
                            <label>
                                <input type="checkbox" id="wechat-toggle">
                                <span class="slider"></span>
                            </label>
                            <span>启用微信推送</span>
                        </div>
                        
                        <div class="action-buttons">
                            <button id="test-push-btn" class="test-btn">测试推送</button>
                            <button id="save-config-btn" class="save-btn">保存配置</button>
                        </div>
                    </div>
                    
                    <div class="group-config">
                        <h3>推送群组设置</h3>
                        <div class="input-group">
                            <input type="text" id="group-input" placeholder="输入群组名称">
                            <button id="add-group-btn">添加群组</button>
                        </div>
                        
                        <div id="groups-list">
                            <p>当前推送群组：</p>
                            <ul id="groups-ul"></ul>
                        </div>
                    </div>
                    
                    <div id="config-status" class="status-message"></div>
                    <div id="system-info" class="system-info">
                        <p>系统信息：</p>
                        <ul>
                            <li>微信推送模块: <span id="notifier-status">--</span></li>
                            <li>系统配置: <span id="system-config">--</span></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 数据展示控制区域 -->
        <div class="controls">
            <button id="refresh-btn">立即刷新</button>
            <label>
                自动刷新:
                <select id="refresh-interval">
                    <option value="30">30秒</option>
                    <option value="60" selected>1分钟</option>
                    <option value="300">5分钟</option>
                    <option value="600">10分钟</option>
                </select>
            </label>
            <label>
                显示数量:
                <select id="display-count">
                    <option value="20">20条</option>
                    <option value="50" selected>50条</option>
                    <option value="100">100条</option>
                </select>
            </label>
        </div>
        
        <div id="telegrams-container">
            <div class="loading">正在加载数据...</div>
        </div>
    </div>
    
    <script src="{{ url_for('static', filename='debug_script.js') }}"></script>
</body>
</html>